	<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>layout布局页面</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<script src="../js/ztree/jquery.ztree.all-3.5.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../js/ztree/zTreeStyle.css" />
		<script type="text/javascript">
			$(function() {
				var setting = {
					data: {
						simpleData: {
							enable: true
						}
					},
					callback: {
						onClick: function(event, treeId, treeNode, clickFlag) {
							if(treeNode.page != undefined && treeNode.page != "") {
								
								if($("#mytabs").tabs('exists',treeNode.name)){
									$("#mytabs").tabs('select',treeNode.name);
								}else{
									$("#mytabs").tabs('add', {
									title: treeNode.name,
									content: '<div style="width:100%;height:100%;overflow:hidden;">' +
										'<iframe src="' +
										treeNode.page +
										'" scrolling= "auto" style="width:100%;height:100%;border:0;"></iframe></div>',
									closable: true
								});
								}
								
							}
						}
					}
				};
				var zNodes = [{
						id: 1,
						pId: 0,
						name: "父节点一"
					},
					{
						id: 2,
						pId: 0,
						name: "父节点二"
					},
					{
						id: 11,
						pId: 1,
						name: "子节点一"
					},
					{
						id: 12,
						pId: 1,
						name: "子节点一"
					},
					{
						id: 13,
						pId: 2,
						name: "传智博客",
						page: "http://www.itcast.cn"
					},
					{
						id: 14,
						pId: 2,
						name: "百度",
						page: "http://www.baidu.com"
					}
				];
				$.fn.zTree.init($("#baseMenu"), setting, zNodes);
				
				$("#mytabs").tabs({
					onContextMenu: function(e, title,index){
						// 阻止默认菜单显示
						e.preventDefault();
						
						// 显示自定义右键菜单
						$("#mm").menu('show',{
							left : e.pageX,
							top : e.pageY
						});
					}
				});

			});
		</script>
	</head>

	<body class="easyui-layout">
		<div data-options="region:'north',title:'传智博客管理系统',split:true" style="height:100px;"></div>
		<div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div>
		<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;"></div>
		<div data-options="region:'west',title:'菜单导航',split:true" style="width:100px;">
			<div id="aa" class="easyui-accordion" data-options="fit:true" style="width:300px;height:200px;">
				<div title="基础面板" style="overflow:auto;padding:10px;">
					<ul id="baseMenu" class="ztree"></ul>
				</div>
				<div title="系统面板" style="padding:10px;">
					实例2
				</div>
				<div title="其他面板">
					实例3
				</div>
			</div>
		</div>
		<div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;">
			<div id="mytabs" class="easyui-tabs" data-options="fit:true">
				<div data-options="title:'选项卡面板一',closable:true">选项卡面板一</div>
				<div data-options="title:'选项卡面板二'">选项卡面板二</div>
			</div>
		</div>
		
		<div id="mm" class="easyui-menu" style="width:120px;">
			<div>关闭当前窗口</div>
			<div>关闭其它窗口</div>
			<div class="menu-sep"></div>  <!-- 分隔线 -->
			<div data-options="iconCls:'icon-cancel'">关闭全部窗口</div>
		</div>
	</body>

</html>